//
//  LYSimpleEmptyController.m
//  DaBaiService
//
//  Created by Mac-Mini-KingVision on 15/12/16.
//  Copyright © 2015年 Mac-Mini-KingVision. All rights reserved.
//

#import "LYSimpleEmptyController.h"
#import <YYCategories.h>
@implementation LYSimpleEmptyController

#pragma mark - DZEmpty delegate

- (UIImage *)imageForEmptyDataSet:(UIScrollView *)scrollView
{
    return self.emptyImage;
}
- (UIColor *)backgroundColorForEmptyDataSet:(UIScrollView *)scrollView
{
    return [UIColor colorWithRed:245.0/255.0 green:245.0/255.0 blue:245.0/255.0 alpha:1];
}

- (NSAttributedString *)descriptionForEmptyDataSet:(UIScrollView *)scrollView
{
    NSString *text = self.emptyText;
    if (self.emptyText == nil) {
        return nil;
    }
    
    NSMutableParagraphStyle *paragraph = [NSMutableParagraphStyle new];
    paragraph.lineBreakMode = NSLineBreakByWordWrapping;
    paragraph.alignment = NSTextAlignmentCenter;
    
    NSDictionary *attributes = @{NSFontAttributeName: [UIFont systemFontOfSize:14.0f],
                                 NSForegroundColorAttributeName: [UIColor lightGrayColor],
                                 NSParagraphStyleAttributeName: paragraph};
    
    return [[NSAttributedString alloc] initWithString:text attributes:attributes];
}

//-(void)setEmptyText:(NSString *)emptyText
//{
//    NSLog(@"%@",emptyText);
//    _emptyText = emptyText;
//}


@end
